load("//devtools/tools:ng_module.bzl", "ng_module")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//devtools/tools:typescript.bzl", "ts_test_library")
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")

package(default_visibility = ["//visibility:public"])

sass_binary(
    name = "devtools_tabs_component_styles",
    src = "devtools-tabs.component.scss",
)

ng_module(
    name = "devtools-tabs",
    srcs = [
        "devtools-tabs.component.ts",
        "devtools-tabs.module.ts",
    ],
    angular_assets = [
        "devtools-tabs.component.html",
        ":devtools_tabs_component_styles",
    ],
    deps = [
        "//devtools/projects/ng-devtools/src/lib:theme",
        "//devtools/projects/ng-devtools/src/lib/application-environment",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/router-tree",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/tab-update",
        "//devtools/projects/protocol",
        "//packages/common",
        "//packages/core",
        "//packages/core/src/util",
        "@npm//@angular/material",
        "@npm//@types",
        "@npm//rxjs",
    ],
)

ts_test_library(
    name = "devtools_tabs_test",
    srcs = ["devtools-tabs.spec.ts"],
    deps = [
        ":devtools-tabs",
        "//devtools/projects/ng-devtools/src/lib/application-environment",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/tab-update",
        "//devtools/projects/protocol",
        "//packages/common",
        "//packages/core",
        "//packages/core/src/util",
    ],
)

# todo(aleksanderbodurri): fix this test suite
karma_web_test_suite(
    name = "test",
    deps = [
        ":devtools_tabs_test",
        "//packages/common/http",
        "//packages/platform-browser/animations",
    ],
)

# spec_bundle(
#     name = "test_bundle",
#     deps = [
#         ":devtools_tabs_test",
#         "//packages/platform-browser/animations",
#         "//packages/animations",
#         "//packages/common/http",
#         "//packages/core",
#         "//packages/core/src/util",
#     ],
#     platform = "browser",
# )
